#   循环     while   迭代
names = ['Michael','Bob','Tracy']
for name in names:
    print(name)

sum=0
for x in [1,2,3,4,5,6,7,8,9,10]:
    sum = sum +x
print(sum)

sum = 0
n = 99
while n >0:
    sum = sum+n
    n = n -2
print(sum)

L = ['Bart','Lisa','Adam']
for i in L:
    print('hello,'+i)

n = 1
while n <=100:
    print(n)
    n = n+1
print('END')

#  break  提前结束循环
n = 1
while  n <=100:
    if n >10:
        break
    print(n)
    n = n+1
print('End')

# continue  跳过当前循环，直接开始下一次循环
n = 0
while n <10:
    n = n + 1
    print(n)

n =0
while n<10:
    n = n+1
    if n%2 ==0:       #偶数执行continue语句
        continue
    print(n)

